package com.hotel.project.common.util;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * TODO
 *
 * @author: peng.ni
 * @date: 2022/04/13
 */
public class JsonUtils {
    public static String toJson(Object obj) {
        Gson gson = new GsonBuilder()
                .setPrettyPrinting()
                .create();
        return gson.toJson(obj);
    }
}
